package com.cqut.forum.dao;

import java.util.List;
import java.util.Map;

import com.cqut.forum.entity.Picture;
import com.cqut.forum.entity.User;

/**
 * 图片数据访问层
 * @author yangxun
 */
public interface PictureDao extends BaseDao {
	
	public List<Map<String, Object>> getAllUnread(int userId,int moduleId,int index,int size);
	public List<Map<String, Object>> getCareUnread(int userId,int moduleId,int index,int size);
	public List<Map<String, Object>> getByLikeName(String groupName,int index,int size);
	
	public List<Picture> getMyUnread(int userId,int index,int size);
	
	/**
	 * 通过分组获取改组的全部图片信息
	 * @param groupId 图片组ID
	 * @return 返回list集合
	 */
	public List<Map<String, Object>> getByGroupId(int groupId,int index,int size,String orderCase,boolean asc);
	
	/**
	 * 通过用户id获取该用户好友的图片
	 * @param userId 用户Id
	 * @return 返回list集合
	 */
	public List<Map<String, Object>> getFriendsPicture(int userId,int index,int size);
	
	/**
	 * 通过用户id获取最新图片
	 * @param userId 用户Id
	 * @return 返回list集合
	 */
	public List<Map<String, Object>> getLastPicture(int index,int size);
	
	public List<Map<String, Object>> getMyAllPicture(int userId,int index,int size,String orderCase,boolean asc);
	
	public List<Map<String, Object>> getHotPicture(int index,int size);
	
	public boolean saveList(List<Picture> pictures);
	
	public int getPictureIndex(int groupId,int pictureId);
	
	public List<Map<String, Object>> loadPicture(String pictureOwner,
			String pictureType, String uploadTime, int index, int size);
	public boolean updatePictureState(int pictureId, boolean state);

	public int count(boolean state);
	
	public User getPictureOwner(int pictureId);
}
